package com.atguigu.hdfs;

import org.junit.Test;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class InputFile {

    @Test
    public void input() throws FileNotFoundException {
        File file = new File("D:\\Desktop\\temp\\shunwukong.txt");
        FileOutputStream fileOutputStream=new FileOutputStream(file);


            try {
                for (int i=0;i<90000000;i++){
                String s="1500016, "+i+", 120002, 1500016, 1, 1, 2021/6/4下午6:23:47, 项目申请, 注意   我要申请南极降雪项目, 同意项目\n";
                byte[] bytes = s.getBytes(StandardCharsets.UTF_8);
                fileOutputStream.write(bytes);
                System.out.println("插入第"+i+"条数据！！！！！");
                }
                fileOutputStream.flush();
            } catch (IOException e) {
                e.printStackTrace();
            }finally {
                try {
                    fileOutputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }




    }

}
